<?php
	session_start();
?>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
</html>
<?php
	//讀取user_controller.php
	require('../../Controller/user_controller.php');
	//讀取post
	$account = $_POST["account"];
	$password = $_POST["password"];
	$password2 = $_POST["password2"];
	$name = $_POST["name"];
	$birth = $_POST["birth"];
	$tel = $_POST["tel"];
	$new_file = $_FILES["upfile"];
	//echo $new_file."<br />";
	//做輸入檢查
	$control = new User_Controller();
	$u_id = $control->Register($account, $password, $password2, $name, $birth, $tel, $new_file);
	header('location:../index.php?id='.$u_id);
?>